<template>
  <div class="csssuper-order clickHide" style="display: none;">
    <div class="module-header">
      <h1 class="mulwbn">{{orderInfo['orderNumber']?orderInfo['orderNumber']:''}}</h1>
      <a @click="orderOMSTo" class="multiple-EF-queryAll orderAcceptURL" href="#">
        查看完整信息&gt;
      </a>
    </div>
    <div class="paper-num">
      <p>
        <label>下单时间</label>
        <span class="active time beforetime">{{beforetime}}</span>
        <span class="time aftertime">{{aftertime}}</span>
        <span class="state">
          <label class="isReceiveGoods">{{isReceiveGoods}}</label>
          <label class="label table_label label-warning orderStatus">
            {{orderInfo['orderStatus']?orderInfo['orderStatus']:''}}
          </label>
          <label class="waybillNumber-label">运单号<span  class="waybillNumber">{{waybillNumber}}</span></label>
        </span>
      </p>
    </div>

    <div class="csssuper-div">
      <div class="csssuper-div-header-unslide">客户信息</div>
      <ul>
        <li>
          <span class="name">
            <img class="mul-xr" src="/static/resources/img/multiple/mul-xr.png">
            <label class="senderName">{{orderInfo['senderName']?orderInfo['senderName']:'无'}}</label>
          </span>
          <span class="phone">
            <img src="/static/resources/img/multiple/mul-sj.png">
            <label class="senderMobile">{{orderInfo['senderMobile']?orderInfo['senderMobile']:'无'}}</label>
          </span>
          <p class="address">
            <img src="/static/resources/img/multiple/mul-dz.png">
            <span>
              <label class="senderProvince">{{orderInfo['senderProvince']?orderInfo['senderProvince']:''}}</label>
              <label class="senderCity">{{orderInfo['senderCity']?orderInfo['senderCity']:''}}</label>
              <label class="senderArea">{{orderInfo['senderArea']?orderInfo['senderArea']:''}}</label>
              <label class="senderAddress">{{orderInfo['senderAddress']?orderInfo['senderAddress']:''}}</label>
            </span>
          </p>
        </li>
        <li>
          <span class="name">
            <img class="mul-xr" src="/static/resources/img/multiple/mul-xr-s.png">
            <label class="receiverName">{{orderInfo['receiverName']?orderInfo['receiverName']:'无'}}</label>
          </span>
          <span class="phone"><img src="/static/resources/img/multiple/mul-sj.png">
            <label class="receiverMobile">{{orderInfo['receiverMobile']?orderInfo['receiverMobile']:'无'}}</label>
          </span>
          <p class="address">
            <img src="/static/resources/img/multiple/mul-dz.png">
            <span>
              <label class="receiverProvince">{{orderInfo['receiverProvince']?orderInfo['receiverProvince']:''}}</label>
              <label class="receiverCity">{{orderInfo['receiverCity']?orderInfo['receiverCity']:''}}</label>
              <label class="receiverArea">{{orderInfo['receiverArea']?orderInfo['receiverArea']:''}}</label>
              <label class="receiverAddress">{{orderInfo['receiverAddress']?orderInfo['receiverAddress']:''}}</label>
            </span>
          </p>
        </li>
      </ul>
    </div>

    <div class="csssuper-div goods-div">
      <div class="csssuper-div-header-unslide">货物信息</div>
      <div class="csssuper-div-content">
        <p class="left">
          <span class="goodsName">{{orderInfo['goodsName']?orderInfo['goodsName']:''}}</span>
          <span class="goodsNumber">{{orderInfo['goodsNumber']?orderInfo['goodsNumber']:''}}</span><mark>件</mark>
          <span class="totalWeight">{{orderInfo['totalWeight']?orderInfo['totalWeight']:''}}</span><mark>KG</mark>
          <span class="totalVolume">{{orderInfo['totalVolume']?orderInfo['totalVolume']:''}}</span><mark>m³</mark>
        </p>
        <p class="right">
          <label>代收货款<span class="dp-font strong dshk">{{orderInfo['dshk']?orderInfo['dshk']:'无'}}</span></label>
          <label>保险价值<span class="dp-font strong bjsmjz">{{orderInfo['bjsmjz']?orderInfo['bjsmjz']:'无'}}</span></label>
        </p>
      </div>
    </div>
    <div class="csssuper-div csssuper-div-fd">
      <div class="csssuper-div-header-unslide">反馈信息</div>
      <div class="csssuper-div-content"><p class="feedbackInfo">{{feedbackInfo}}</p></div>
    </div>
  </div>
</template>

<script>
    export default {
        name: "order-seach-com",
        props:['orderInfo'],
        data(){
          return {

          };
        },
        computed:{
          omsXTstr(){
            let omsXTstr = "零担订单受理";
            if(this.orderInfo.hasOwnProperty('orderType')){
              if("exp"===this.orderInfo["orderType"]){
                omsXTstr = "快递订单受理";
              }
            }
            return omsXTstr;
          },
          omsXTurl(){
            let omsXTurl = "";
            if(this.orderInfo.hasOwnProperty('orderAcceptURL')){
              omsXTurl = this.orderInfo["orderAcceptURL"];
            }
            return omsXTurl;
          },
          isReceiveGoods(){
            return this.orderInfo.hasOwnProperty('isReceiveGoods')?"非上门取货":'上门取货';
          },
          waybillNumber(){
            let temp = '无';
            if(this.orderInfo.hasOwnProperty('waybillNumber')){
              temp = this.orderInfo["waybillNumber"];
              if(null==temp||''===temp||'undefined'===temp){
                // $(".waybill-num").css("display","none");
                // document.querySelectorAll('.waybill-num')[0].style.display = 'none';
                temp = '无';
                // $(".csssuper-order .waybillNumber").html('无');
              }else{
                // $(".waybill-num").css("display","block");
                // document.querySelectorAll('.waybill-num')[0].style.display = 'block';
                // $(".csssuper-order .waybillNumber").html(temp);
              }
            }
            return temp;
          },
          feedbackInfo(){
            let temp = "无";
            if(this.orderInfo.hasOwnProperty('feedbackInfo')){
              temp = this.orderInfo["feedbackInfo"];
              if(temp===''||null===temp){
                // $(".csssuper-order .feedbackInfo").html("无");
                temp = "无";
                // $('.csssuper-div-fd').hide();//信息无隐藏
                document.querySelectorAll('.csssuper-div-fd')[0].style.display = 'none';
              }else{
                // $(".csssuper-order .feedbackInfo").html(feedbackInfonull);
              }
            }
            return temp;
          },
          beforetime(){
            let beforetime = '';
            if(this.orderInfo.hasOwnProperty('createTime')){
              let feedbackInfonull = this.orderInfo["createTime"];
              let createDate = new Date(feedbackInfonull);
              beforetime = createDate.format("yyyy-MM-dd");
            }
            return beforetime;
          },
          aftertime(){
            let aftertime = '';
            if(this.orderInfo.hasOwnProperty('createTime')){
              let feedbackInfonull = this.orderInfo["createTime"];
              let createDate = new Date(feedbackInfonull);
              aftertime = returnTimeTwoStrMul(createDate.getHours()) + ":" + returnTimeTwoStrMul(createDate.getMinutes());
            }
            return aftertime;
          }
        },
        methods:{
          orderOMSTo(){
            orderOMSTo(this.omsXTstr,this.omsXTurl,this.orderInfo['orderNumber']);
          }
        }
    }
</script>

<style scoped>

</style>
